/*
 * LexicalEdge.java
 *
 * Created on June 27, 2006, 1:01 PM
 *
 */

package galronnlp.pcfg.parser;

import galronnlp.util.Symbol;

/**
 * Implementation of an edge for lexical entries. It consists of only a single
 * <code>Symbol</code>, representing the right-hand terminal.
 *
 * <p>
 * This is based on the edges as defined in Chris Brew's python
 * Statistical CKY parser
 * @author Daniel A. Galron
 */
public class LexicalEdge extends Edge{
    
    private Symbol entry;
    
    /**
     * Creates a new instance of LexicalEdge
     */
    public LexicalEdge(Symbol e) {
        this.entry = e;
    }
    
    public int type() {
        return LEXICAL;
    }
    
    public Symbol entry() {
        return entry;
    }
    
    public String toString() {
        return entry.toString();
    }
    
}
